package com.lantosec.hmrp.modules.system.entity;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.system.vo.SysPositionVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 岗位表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-02-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysPosition extends BaseEntity<SysPositionVO> {

    private static final long serialVersionUID = 1L;
    public SysPosition(SysPositionVO vo){
        this.positionId = vo.getPositionId();
        this.positionName = vo.getPositionName();
        this.positionOrder = vo.getPositionOrder();
        this.flag = vo.getFlag();
    }

    @Override
    public SysPositionVO convertToVO(){
        return new SysPositionVO(this);
    }


    /**
     * ID
     */
    @TableId(value = "position_id", type = IdType.ASSIGN_UUID)
    private String positionId;

    /**
     * 岗位名称
     */
    private String positionName;

    /**
     * 排序
     */
    private Integer positionOrder;

    /**
     * 是否删除
     */
    private Boolean flag;


    public enum ColName {
        position_id, position_name, position_order, flag,
    }
}
